//
//  CCStarryQRCode.m
//  SYPerfectDemo
//
//  Created by Lssyyy on 2018/12/11.
//  Copyright © 2018年 Lssyyy. All rights reserved.
//

#import "CCStarryQRCode.h"
#import "QRCodeContentView.h"
@interface CCStarryQRCode ()
@property (strong, nonatomic) QRCodeContentView *qrCodeContentView;

@end

@implementation CCStarryQRCode

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.qrCodeContentView];
    _qrCodeContentView.qrCodeInfo = @"www.baidu.com";
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    _qrCodeContentView.qrCodeInfo = @"www.yahoo.com";
}

- (QRCodeContentView *)qrCodeContentView{
    if (!_qrCodeContentView) {
        _qrCodeContentView = [[QRCodeContentView alloc]init];
        CGFloat viewWidth = kScreenWidth-30;
        _qrCodeContentView.frame = CGRectMake(15, 26, viewWidth,viewWidth/0.848);
    }
    return _qrCodeContentView;
}

- (void)dealloc{
    NSLog(@"释放codeVC");
}
@end
